<? startScript('jquery, jquery.tools'); ?><script type="text/javascript">
	jQuery(function($) { $("ul.jt-tabs").tabs("div.jt-panes > div"); });
</script><? endScript(); ?>

<form action="" method="post">

<fieldset><legend> <?=t('Render settings', 'cpn')?> </legend>

	<p><label><?=t('Gallery path', 'cpn')?>
		<input type="text" name="path" class="wide" value="<?=hdat('settings', 'path')?>">
	</label></p>

	<p><label><?=t('Image URL parameter', 'cpn')?>
		<input type="text" name="param" class="wide" value="<?=hdat('settings', 'param')?>">
	</label></p>
	
	<p><label><?=t('Image size', 'cpn')?>
		<input type="text" name="w" class="narrow" value="<?=hdat('settings', 'w')?>"> x <input type="text" name="h" class="narrow" value="<?=hdat('settings', 'h')?>">
	</label></p>

	<p><label><?=t('Thumbnail size', 'cpn')?>
		<input type="text" name="tnw" class="narrow" value="<?=hdat('settings', 'tnw')?>"> x <input type="text" name="tnh" class="narrow" value="<?=hdat('settings', 'tnh')?>">
	</label></p>

	<p><label><?=t('Thumbnail scale mode', 'cpn')?>
		<select name="tnmode">
			<option value="<?=MI_FIT?>" <?=(dat('settings', 'tnmode') == MI_FIT) ? 'selected' : ''?>><?=t('Scale down proportionally', 'cpn')?></option>
			<option value="<?=MI_CUT_CENTER?>" <?=(dat('settings', 'tnmode') == MI_CUT_CENTER) ? 'selected' : ''?>><?=t('Extract as much as possible to fit the desired size', 'cpn')?></option>
		</select>
	</label></p>

	<p><label><?=t('Image scale mode', 'cpn')?>
		<select name="imode">
			<option value="<?=MI_FIT?>" <?=(dat('settings', 'imode') == MI_FIT) ? 'selected' : ''?>><?=t('Scale down proportionally', 'cpn')?></option>
			<option value="<?=MI_CUT_CENTER?>" <?=(dat('settings', 'imode') == MI_CUT_CENTER) ? 'selected' : ''?>><?=t('Extract as much as possible to fit the desired size', 'cpn')?></option>
		</select>
	</label></p>

	<p><label><?=t('Show', 'cpn')?> 
		<select name="show_tn">
			<option value="0" <?=dat('settings', 'show_tn') ? '' : 'selected'?>><?=t('Images', 'cpn')?></option>
			<option value="1" <?=dat('settings', 'show_tn') ? 'selected' : ''?>><?=t('Thumbnails', 'cpn')?></option>
		</select>
	</label></p>

	<p><label><?=t('Navigation', 'cpn')?> 
		<select name="nav">
			<option value="0" <?=(dat('settings', 'nav') == 0) ? 'selected' : ''?>><?=t('Scrollable', 'cpn')?></option>
			<option value="1" <?=(dat('settings', 'nav') == 1) ? 'selected' : ''?>><?=t('Parallax', 'cpn')?></option>
			<option value="2" <?=(dat('settings', 'nav') == 2) ? 'selected' : ''?>><?=t('Grouped Scrollable', 'cpn')?></option>
			<option value="3" <?=(dat('settings', 'nav') == 3) ? 'selected' : ''?>><?=t('Slideshow', 'cpn')?></option>
		</select>
	</label></p>

	<p><label><?=t('Gallery thumbnail per block count', 'cpn')?>
		<input type="text" name="gtpb" class="narrow" value="<?=hdat('settings', 'gtpb')?>">
	</label></p>

	<p>
		<label><input type="checkbox" name="navigator" value="1" <?=dat('settings', 'navigator') ? 'checked' : ''?> /> <?=t('Navigator', 'cpn')?></label>
		<label><input type="checkbox" name="circular" value="1" <?=dat('settings', 'circular') ? 'checked' : ''?> /> <?=t('Circular', 'cpn')?></label>
		<label><input type="checkbox" name="autoscroll" value="1" <?=dat('settings', 'autoscroll') ? 'checked' : ''?> /> <?=t('Autoscroll', 'cpn')?></label>
		<label><input type="checkbox" name="show_title" value="1" <?=dat('settings', 'show_title') ? 'checked' : ''?> /> <?=t('Show title', 'cpn')?></label>
		<label><input type="checkbox" name="show_descr" value="1" <?=dat('settings', 'show_descr') ? 'checked' : ''?> /> <?=t('Show description', 'cpn')?></label>
		<label><input type="checkbox" name="fancybox" value="1" <?=dat('settings', 'fancybox') ? 'checked' : ''?> /> <?=t('Fancybox', 'cpn')?></label>
	</p>

</fieldset>

<fieldset><legend> <?=t('Static content settings', 'cpn')?> </legend>

	<ul class="jt-tabs"><?
	
		foreach($DATA['langs'] as $lang) {
			?><li><a href="#<?=$lang['text']?>"><?=$lang['assoc']?></a></li><? 
		} 
		
	?></ul>
	
	<div class="jt-panes"><? $t = true; 
	
			foreach($DATA['langs'] as $lang) { $l = $lang['text'];
	
			?><div class="jt-pane" style="<?=$t ? 'display:block' : ''?>">
	
				<p><label><?=t('Gallery caption', 'cpn')?>
					<textarea name="caption[<?=$l?>]" class="wide"><?=dat('settings', 'data', $l, 'caption')?></textarea>
				</label></p>

			</div><? 
		
		$t = false; }
	
	?></div>

</fieldset>

	<p><input type="submit" name="editor_save" value="<?=t('Save', 'cpn')?>" /></p>

</form>
